home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
201-220
/
scopedisk215
/
listcom
/
listcom.doc
< prev
next >
Wrap
Text File
|
1995-03-19
|
5KB
|
142 lines
ListCom Version 1.33 Release 10/19/1991
ListCom is copyrighted but the source can be changed and
improved it if you wish.
No warranty is expressed or implied. Use at your own risk. Author
is not responsible for loss or damage resulting from use.
(standard software disclaimer)
Phew, that's over with ...
Program:
========
ListCom stands for List Comments. A Comment is a standard AmigaDOS
file comment also referred to as a file note.
I wrote ListCom because all of the DIR and LIST replacements did not
give you the choice of listing by the comment. Now granted, many
normal people probably don't need this feature, but I am not one of
those people. ListCom is not intended to replace LIST or DIR.
ListCom simply lists files by comment. There are many switches, and
AmigaDOS Pattern Matching for filenames and comments! All matching
is case in-sensative, ie: joe = JoE. If you wish to search with
imbeded spaces, use double quotes around the argument, (ie: "arg test").
Typing ListCom or ListCom ? will list the usage.
Examples of use:
================
ListCom ? ;list template, version and usage.
ListCom ;list current directory, all files with comments
ListCom - ;same as above
ListCom "" ;same as above
ListCom "" "" ;same as above
ListCom t: #? ;list all files even files without a comment
as a file without a comment will match the
#? (all) wildcard symbol.
ListCom TERMS:DownLoads "docs for #?" ;list files in TERMS:Downloads/
with comments beginning with
"docs for " (ignore quotes)
ListCom "" Utility#? ;list current directory all files with comments
beginning with "utility".
ListCom DH0:j#? Util#? ;list all files in DH0: starting with "j" and
having comments starting with "Util".
ListCom #?.lzh Util:#? ;If executed in below directory will list only
foo3.lzh as both requirements are matched
only by foo3.lzh
foo1.arc "Util:CLI-dir replacement"
foo2.lzh "Appl:DB-PD database"
*foo3.lzh "Util:WB2.0-Tool Menu program"
Switches/options:
=================
-m = Stop at first displayed match
-f = Don't format the output. Listcom usually outputs in the form:
>FileName___________< >size_< >comment____________________...
With the -f option:
>filename< >size< >Comment...<
Note: multiple lists will be hard to read
-h = Don't show the heading (simular to AmigaDOS List NOHEAD option
-s = Don't show the files' size (in bytes).
-c = Don't show the comment (here for output redirection control)
-q = Quiet option, same as doing: -h -s -c
-n = Don't generate a new line character after showing entry
Suggested use is with -m option or redirected output which
doesn't want a newline character.
Enjoy! :D
John Bianchi
Send Bug Reports to:
BIX: jbianchi
CIS: 76256,3436
=============================== HISTORY ================================
* 08/10/91 - created/imagined/wrote/hair-loss/loss-of-sanity....
* 08/11/91 - Made Residentable - PURE (re-entrant & Re-executable)
* 08/12/91 - Improved (kinda) and added ansi to template.
* 08/13/91 - Bug Crushed - False Read/Write Error in AmigaDOS 1.3 only.
For some reason, when you ListCom with a filename specified (not a
directory), with or without a comment, a false read/write error
requestor would come up if the file wasn't found. This only occurred
in 1.3. (1.3.3 actually)
* 10/08/91 - more lost sleep as I tried to implement switches
* 10/09/91 -
* 10/17/91 -
================================ THANKS ================================
Thanks to Browser for including C source. Special thanks for
PatMatch.c without it I would never had made this revision.
(and probably would have had more sleep ;) zzZZZ
Thanks to Vic and Steve on CIS for their help.
Thanks Abacus for the great books
Thanks: All Amiga programmers that included source (especially the small
utility programs) which helped me learn and write this code.
Thanks CBM! Especially for the execute source to compile idea! One of
the worst parts of learning C on the Amiga is learning the compiler and
linker commands! And MAKEFILES don't help 1 bit! (or even 8 bytes :)
Guess one day i'll try to learn that one. It's hard as most C source
with MAKEFILES are to help manage large code segments - which also
makes it VERY hard to understand.
============================= COMMENTS ================================
I hope my source is commented enough. As ListCom's output is handled
by a call to showfileinfo(), any C programmer just learning can change
the output (try including protection bits, blocks, etc and a total line
for the end of the list). Hopefully, the source will help you learn
argument parsing, etc.
============================ END OF DOCS ==============================